<?php
/* @var $this EventController */
/* @var $model Event */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'event-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'event_name'); ?>
		<?php echo $form->textField($model,'event_name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'event_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'time'); ?>
		<?php echo $form->textField($model,'time'); ?>
		<?php echo $form->error($model,'time'); ?>
	</div>


	
	 <div class="row">
                <?php echo $form->labelEx($model,'date'); ?>
                        <?php $form->widget('zii.widgets.jui.CJuiDatePicker', array(
                        'model'=>$model,
                        'attribute'=>'date',
                        'name'=>'date',
                        'options'=>array(
                        'dateFormat'=>'yy-mm-dd',
                        'changeMonth'=> true,
                        'changeYear'=>true,
                        'showAnim'=>'fold',
                        'showOn'=>'button',
                        'buttonText'=>'Select form calendar',
                        'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.jpg',
                        'buttonImageOnly'=>true,
                        'dateRange'=>'1960:2020',
                        ),
                        'htmlOptions'=>array(
                        'style'=>'width:100px;vertical-align:top'
                        ),
                        ));
                        ?>
                <?php echo $form->error($model,'date'); ?>
        </div>

	<div class="row">
		<?php echo $form->labelEx($model,'location'); ?>
		<?php echo $form->textField($model,'location',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'location'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'details'); ?>
		<?php echo $form->textArea($model,'details',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'details'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->